package com.zstu.mall.service.impl;

import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import com.zstu.mall.common.BaseServiceImpl;
import com.zstu.mall.service.LoggingService;
import com.zstu.mall.entity.Logging;
import com.zstu.mall.dao.LoggingDao;

/**
 * @author     : wuyc
 * @description: LoggingServiceImpl
 * @date       : Created in 2019/11/24
 */
@Service
public class LoggingServiceImpl extends BaseServiceImpl<Logging, String, LoggingDao> implements LoggingService {

	@Autowired
	private LoggingDao loggingdao;

	/**
	 * 更改订单状态
	 * @param id
	 * @param user
	 * @param product
	 * @param activity
	 * @param remark
	 */
	public void createLog(String id, String user, String product, String activity, String remark){
		//添加日志
		Logging logging = new Logging();
		logging.setId(id);
		logging.setUserId(user);
		logging.setProductId(product);
		logging.setActivityId(activity);
		logging.setRemark(remark);
		loggingdao.save(logging);
	}

}
